set the visible of card btn "Ted Press Here" to not the visible of card btn "Ted Press Here"
end tt
on OpenCard
GLOBAL SEL,fName,Help,sol,env,environments,envnum,solutions, solnum
put false into Help
hide background Button "Action"
--hide menubar
send mouseUp to card button "environments" --on card "Matrix"
--put "check the OpenCard script, JON" into msg
-- we should set the field environments to its proper type when we
-- leave this card rather than on open. its v. distracting when
-- it blinks at you, JON.
put "Select an Environment" & return & "by clicking on its icon." into fld "Tell"
--get random(3)
--put item it of ("B,P,R") into env
--put env into fld "Sentence"
--put item it of ("b,f,n") into sol
--put sol after fld "Sentence"
--wait 15
--show bkgnd btn "Action"
end Opencard
on closeCard
--•set environments up
global LH, TS,inc,margin,left, top, right, bottom--for locating
global hich, hiline, sel, fname--for tagging selected to deselect
global Help
--•deselect
--DESELECT and Zero THE PREVIOUS SELECTION BEFORE SHOWING FIELD
--also hide previous field
if sel<>empty then
put sel into character hich of line hiline of field fName
put empty into sel
end if
if fName<>empty then hide field fName
hide field prodholder
show field sentence
--•SHOW FIELD SELECTED•
put "environments" into fName
show field fName
--•INITIALIZE•
--initialize and set variables used by field just selected
get the rect of field fName--this may vary with the field shown
put item 1 of it into left
put item 2 of it into top
put item 3 of it into right
put item 4 of it into bottom
put the textHeight of field fName into LH
put 90 into TS--•length of character•
put the number of lines in field fName into inc
put 5 into margin
put empty into hich--put empty into select variables
put empty into hiline
put empty into sel
put empty into field "Sentence"
put empty into field "ProdHolder"
set the hilite of cd button "Environments" to false
set the hilite of cd button "Solutions" to false
set the hilite of cd button "Products" to false
hide cd button "Search..."
if Help is true then
put false into Help
hide field "Explainer"
set the hilite of button "Help" to false
end if
end closeCard
-- part 60 (button)
-- low flags: 00
-- high flags: 4000
-- rect: left=0 top=0 right=27 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Title bar
-- part 56 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=0 top=0 right=25 bottom=245
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 156
-- text size: 18
-- style flags: 2048
-- line height: 24
-- part name: Title
-- part 7 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=405 top=219 right=285 bottom=505
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Products
----- HyperTalk script -----
on mouseEnter
put "Products Button" & return & "click to show products" into fld "Tell"
changeCurs 6069
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseLeave
On mouseDown
Global ClickSND
play ClickSND
End mouseDown
on mouseUp
global LH,inc,left, top, right, bottom--for locating
global sel,hich,hiline,fName,product
set lockscreen to true
put empty into field sentence
hide field sentence
put empty into field prodholder
show field prodholder
set the hilite of me to true
set the hilite of cd button "Solutions" to false
set the hilite of cd button "Environments" to false
--•deselect
--DESELECT and Zero THE PREVIOUS SELECTION BEFORE SHOWING FIELD
if sel<>empty then
put sel into character hich of line hiline of field fName
put empty into sel
end if
if fName<>empty then hide field fName
--•SHOW FIELD SELECTED•
get the short name of the target
put it into fName
show field fName
--•INITIALIZE•
--initialize and set variables used by field just selected
get the rect of field fName--this may vary with the field shown
put item 1 of it into left
put item 2 of it into top
put item 3 of it into right
put item 4 of it into bottom
put the textHeight of field fName into LH
put the number of lines in field fName into inc
hide background button "Action"
show cd button "Search..."
unlock screen with dissolve fast
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=10 top=54 right=97 bottom=105
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: environments
----- HyperTalk script -----
--• HELP
on mouseEnter
put "Environment Button" & return & "click to see environments" into fld "Tell"
changeCurs 6069
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseLeave
On mouseDown
Global ClickSND
play ClickSND
End mouseDown
on mouseUp
--globals intialized for 1 of 3 fields
global LH, TS,inc,margin,left, top, right, bottom--for locating
global hich, hiline, sel, fname--for tagging selected to deselect
global Help
if Help then exit mouseUp
--•deselect
--DESELECT and Zero THE PREVIOUS SELECTION BEFORE SHOWING FIELD
--also hide previous field
set lockscreen to true
set the hilite of me to true
set the hilite of cd button "Solutions" to false
set the hilite of cd button "Products" to false
hide cd button "View Product Card"
hide cd button "Search..."
if sel<>empty then
put sel into character hich of line hiline of field fName
put empty into sel
end if
if fName<>empty then hide field fName
hide field prodholder
show field sentence
--•SHOW FIELD SELECTED•
get the short name of the target
put it into fName
show field fName
--•INITIALIZE•
--initialize and set variables used by field just selected
get the rect of field fName--this may vary with the field shown
put item 1 of it into left
put item 2 of it into top
put item 3 of it into right
put item 4 of it into bottom
put the textHeight of field fName into LH
put 90 into TS--•length of character•
put the number of lines in field fName into inc
put 5 into margin
put empty into hich--put empty into select variables
put empty into hiline
put empty into sel
unlock screen with dissolve fast
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=10 top=132 right=175 bottom=105
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Solutions
----- HyperTalk script -----
on mouseEnter
put "Show Solutions Button" & return & "click to see solutions" into fld "Tell"
changeCurs 6069
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseLeave
On mouseDown
Global ClickSND
play ClickSND
End mouseDown
on mouseUp
--globals intialized for 1 of 3 fields
global LH, TS,inc,margin,left, top, right, bottom--for locating
global hich, hiline, sel, fname--for tagging selected to deselect
global Help
if Help then exit mouseUp
--• This pumps the proper Chars into field according to Linked' list.
if the optionKey is "Down" then
put "bdfh" & return & "jlnt" & return & "x" & return into field solutions
end if
--•deselect
--DESELECT and Zero THE PREVIOUS SELECTION BEFORE SHOWING FIELD
set lockscreen to true
set the hilite of me to true
set the hilite of cd button "Environments" to false
set the hilite of cd button "Products" to false
hide cd btn "View Product Card"
hide cd button "Search..."
if sel<>empty then
put sel into character hich of line hiline of field fName
put empty into sel
end if
if fName<>empty then hide field fName
hide field prodholder
show field sentence
--•SHOW FIELD SELECTED•
get the short name of the target
put it into fName
show field fName
--•INITIALIZE•
--initialize and set variables used by field just selected
get the rect of field fName--this may vary with the field shown
put item 1 of it into left
put item 2 of it into top
put item 3 of it into right
put item 4 of it into bottom
put the textHeight of field fName into LH
put 90 into TS--•length of character•
put the number of lines in field fName into inc
put 5 into margin
put empty into hich--put empty into select variables
put empty into hiline
put empty into sel
unlock screen with dissolve fast
end mouseUp
-- part 39 (button)
-- low flags: 80
-- high flags: A001
-- rect: left=356 top=2 right=20 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Ted Press Here
----- HyperTalk script -----
on mouseUp
set the visible of field "list" to not the visible of field "list"
set the locktext of field "list" to not the visible of field "list"
set the visible of cd field "To Ted" to not the visible of cd field "To Ted"
end mouseUp
-- part 40 (field)
-- low flags: 81
-- high flags: 2007
-- rect: left=300 top=36 right=196 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: To Ted
-- part 55 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=427 top=303 right=342 bottom=469
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Mask
----- HyperTalk script -----
on mouseEnter
put "Matrix Button" & return & "the current card" into fld "Tell"
end mouseEnter
on mouseLeave
put empty into fld "Tell"
end mouseLeave
-- part 58 (button)
-- low flags: 80
-- high flags: C004
-- rect: left=403 top=188 right=213 bottom=507
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Search...
----- HyperTalk script -----
on mouseUp
global secondsearch
ask "Enter full or partial product name." with secondsearch
if it is not empty then
put it into secondsearch
find string secondsearch in fld "Products"
end if
end mouseUp
-- part 62 (button)
-- low flags: 80
-- high flags: 4000
-- rect: left=121 top=104 right=124 bottom=491
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: productsHiliter
-- part 64 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=500 top=157 right=169 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: solutionsHiliter
-- part 65 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=500 top=81 right=93 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: environmentsHiliter
-- part 66 (button)
-- low flags: 80
-- high flags: C004
-- rect: left=263 top=188 right=213 bottom=397
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: View Product Card
----- HyperTalk script -----
on mouseEnter
put "Product Card Button" & return & "click to see product below" into fld "Tell"
changeCurs 6069
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseLeave
on mouseUp
put char 1 to 26 of bkgnd fld prodHolder into product
push card
set lockscreen to true
set hilite of cd button "Environments" to false
set hilite of cd button "Solutions" to false
set hilite of cd button "Products" to false
go to card product of stack "Products"
end mouseUp
On mouseDown
Global ClickSND
play ClickSND
End mouseDown
-- part contents for background part 4
----- text -----
BDPR
HNL
-- part contents for background part 7
----- text -----
Digital
Digital
IBM
IBM
HP
HP
Tandem
Tandem
Prime
Prime
Wang
Wang
Unix
Unix
Mac
Mac
PC
PC
OS/2
OS/2
Sun
Sun
Apollo
Apollo
Communications
Communications
Publishing
Publishing
Engineering/CAD
Engineering/CAD
Business
Business
Info Management
Info Management
Software Development
Software Development
Office Productivity
Office Productivity
Print
Print
File
File
Hardware
Hardware
Mail
Mail
Network Services
Network Services
Terminal Emulation
Terminal Emulation
-- part contents for background part 12
----- text -----
Click a Presentation to see its PICTs. To install your own PICTs, place them into the FOLDER with the same name as the Presentation you want them to be in. 'Update' the Presentation selected to list all available PICTs.
-- part contents for card part 40
----- text -----
Ted,
The env and sol in the bkgd field "list" at right are accessesed by the "Action" button (it use to be the "go to room button"). The script takes the first word of the sentance field which is the env and finds its corollary in field "list" it does the same with the sol. As you remember, each env and sol icons is actually a single char in a font Jonathan made. Each env and sol char is matched with its long name in field "list" by getting the ASCII number of the env or sol char , then subtracting an offset, and then using this number as its line number in field list. The code is in equation form in button "Action"